<!DOCTYPE html>
<!--[if lt IE 7]>       <html class="no-js lt-ie9 lt-ie8 lt-ie7">   <![endif]-->
<!--[if IE 7]>          <html class="no-js lt-ie9 lt-ie8">          <![endif]-->
<!--[if IE 8]>          <html class="no-js lt-ie9">                 <![endif]-->
<!--[if gt IE 8]><!-->  <html class="no-js">                        <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title><?php CHtml::encode($this->pageTitle); ?></title>
        <meta name="viewport" content="width=device-width">
        <link type="text/css" rel="stylesheet" href="<?php echo BACKEND_SITE_URL ?>css/bootstrap.min.css">
        <link type="text/css" rel="stylesheet" href="<?php echo BACKEND_SITE_URL ?>css/bootstrap-responsive.min.css">
        <link type="text/css" rel="stylesheet" href="<?php echo BACKEND_SITE_URL ?>css/font-awesome.min.css">
        <link type="text/css" rel="stylesheet" href="<?php echo BACKEND_SITE_URL ?>css/chosen.css">
        <link type="text/css" rel="stylesheet" href="<?php echo BACKEND_SITE_URL ?>css/sticky.css">
        <link type="text/css" rel="stylesheet" href="<?php echo BACKEND_SITE_URL ?>css/style.css">
        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
        <!--[if IE 7]>
        <link type="text/css" rel="stylesheet" href="<?php echo BACKEND_SITE_URL ?>css/font-awesome-ie7.min.css"/>
        <![endif]-->

        <script src="<?php echo BACKEND_SITE_URL ?>js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
    </head>
    <body class="padTop44 <?php if (isset($this->hidesidebar)) echo 'hide-sidebar'; ?>">
        <!-- BEGIN WRAP -->
        <div id="wrap">


            <!-- BEGIN TOP BAR -->
            <div id="top">
                <!-- .navbar -->
                <div class="navbar navbar-inverse navbar-fixed-top">
                    <div class="navbar-inner">
                        <div class="container-fluid">
                            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </a>
                            <a class="brand" href="<?php echo BACKEND_SITE_URL ?>"><?php //echo app()->name ?></a>
                            <!-- .topnav -->
                            <div class="btn-toolbar topnav">
                                <div class="btn-group">
                                    <a id="changeSidebarPos" class="btn btn-success" rel="tooltip"
                                       data-original-title="Show / Hide Sidebar" data-placement="bottom">
                                        <i class="icon-resize-horizontal"></i>
                                    </a>
                                </div>

                                <div class="btn-group">
                                    <a class="btn btn-inverse" data-placement="bottom" data-original-title="Logout" rel="tooltip" onclick='return confirm("Are you sure?")' href="<?php echo url('/site/logout') ?>"><i class="icon-off"></i></a></div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.navbar -->
            </div>
            <!-- END TOP BAR -->


            <!-- BEGIN HEADER.head -->
            <header class="head">
                <div class="search-bar">
                    <div class="row-fluid">
                        <div class="span12">
                            <div class="search-bar-inner" style="height: 38px;">
                                <a id="menu-toggle" href="#menu" data-toggle="collapse"
                                   class="accordion-toggle btn btn-inverse visible-phone"
                                   rel="tooltip" data-placement="bottom" data-original-title="Show/Hide Menu">
                                    <i class="icon-sort"></i>
                                </a>


<!--                                <form class="main-search" action="<?php echo url('/cms/search') ?>">
                                    <input class="input-block-level" type="text" placeholder="Live search..." name="keywords" />
                                    <button id="searchBtn" type="submit" class="btn btn-inverse"><i class="icon-search"></i></button>
                                </form>-->
                            </div>
                        </div>
                    </div>

                </div>
                <!-- ."main-bar -->
                <div class="main-bar">
                    <div class="container-fluid">
                        <div class="row-fluid">
                            <div class="span12">
                                <?php if (isset($this->breadcrumbs)): ?>
                                    <div id='breadcrumbs'>
                                        <?php
                                        $this->widget('bootstrap.widgets.TbBreadcrumbs', array(
                                            'homeLink' => '<i class="icon-home"></i>',
                                            'separator' => '&nbsp;<i class="icon-chevron-right"></i>&nbsp;',
                                            'links' => $this->breadcrumbs,
                                            'encodeLabel' => FALSE,
                                        ));
                                        ?>
                                    </div><!-- breadcrumbs -->
                                <?php endif ?>
                            </div>
                        </div>
                        <!-- /.row-fluid -->
                    </div>
                    <!-- /.container-fluid -->
                </div>
                <!-- /.main-bar -->
            </header>
            <!-- END HEADER.head -->

            <!-- BEGIN LEFT  -->
            <div id="left">

                <!-- BEGIN MAIN NAVIGATION -->

                <ul id="menu" class="unstyled accordion collapse in">
                    <li class="accordion-group <?php echo $this->activeMenu == 'dashboard' ? 'active' : ''; ?>">
                        <a href="<?php echo url('/dashboard/index') ?>">
                            <i class="icon-dashboard icon-large"></i> Dashboard <span class="label label-inverse pull-right"></span>
                        </a>
                    </li>
                    
                    <!-- Bus -->
                    <li class="accordion-group <?php echo $this->activeMenu == 'bus' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#bus-nav">
                            <i class="icon-envelope icon-large"></i> Bus <span class="label label-inverse pull-right">3</span>
                        </a>
                        <ul class="collapse " id="bus-nav">
                            <li><a href="<?php echo url('/bus/create') ?>"><i class="icon-angle-right"></i>Add new Bus</a></li>
                            <li><a href="<?php echo url('/bus/index') ?>"><i class="icon-angle-right"></i>Bus manager</a></li>
                            <li><a href="<?php echo url('/busdetail/index') ?>"><i class="icon-angle-right"></i>BusDetail manager</a></li>
                        </ul>
                    </li>
                    <!-- #Bus -->
                    
                    <!-- station -->
                    <li class="accordion-group <?php echo $this->activeMenu == 'station' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#station-nav">
                            <i class="icon-envelope icon-large"></i> Station <span class="label label-inverse pull-right">2</span>
                        </a>
                        <ul class="collapse " id="station-nav">
                            <li><a href="<?php echo url('/station/create') ?>"><i class="icon-angle-right"></i>Add new Station</a></li>
                            <li><a href="<?php echo url('/station/index') ?>"><i class="icon-angle-right"></i>Station manager</a></li>
                        </ul>
                    </li>
                    <!-- #station -->
                    
                    <!-- street -->
                    <li class="accordion-group <?php echo $this->activeMenu == 'street' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#street-nav">
                            <i class="icon-envelope icon-large"></i> Street <span class="label label-inverse pull-right">2</span>
                        </a>
                        <ul class="collapse " id="street-nav">
                            <li><a href="<?php echo url('/street/create') ?>"><i class="icon-angle-right"></i>Add new Street</a></li>
                            <li><a href="<?php echo url('/street/index') ?>"><i class="icon-angle-right"></i>Street manager</a></li>
                        </ul>
                    </li>
                    <!-- #street -->
                    
                    
                    
                </ul>
                <!-- END MAIN NAVIGATION -->

            </div>
            <!-- END LEFT -->

            <!-- BEGIN MAIN CONTENT -->
            <div id="content">
                <!-- .outer -->
                <div class="container-fluid outer">
                    <div class="row-fluid">
                        <!-- .inner -->
                        <div class="span12 inner">
                            <?php echo $content ?>
                        </div>
                        <!-- /.inner -->
                    </div>
                    <!-- /.row-fluid -->
                </div>
                <!-- /.outer -->
            </div>
            <!-- END CONTENT -->


            <!-- #push do not remove -->
            <div id="push"></div>
            <!-- /#push -->
        </div>
        <!-- END WRAP -->

        <div class="clearfix"></div>

        <!-- BEGIN FOOTER -->
        <div id="footer">
            <p><?php echo date('Y') ?> © Hai</p>
        </div>
        <!-- END FOOTER -->

        <!-- #helpModal -->
        <div id="helpModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="helpModalLabel"
             aria-hidden="true">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
                <h3 id="helpModalLabel"><i class="icon-external-link"></i> Help</h3>
            </div>
            <div class="modal-body">
                <p>
                    Beta version
                </p>
            </div>
            <div class="modal-footer">
                <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
            </div>
        </div>
        <!-- /#helpModal -->
        <script src="<?php echo BACKEND_SITE_URL ?>js/vendor/jquery-migrate-1.1.1.min.js"></script>
        <script src="<?php echo BACKEND_SITE_URL ?>js/lib/jquery.tablesorter.min.js"></script>
        <script src="<?php echo BACKEND_SITE_URL ?>js/lib/jquery.mousewheel.js"></script>
        <script src="<?php echo BACKEND_SITE_URL ?>js/sticky.min.js"></script>
        <script src="<?php echo BACKEND_SITE_URL ?>js/lib/chosen.jquery.min.js"></script>
        <script src="<?php echo BACKEND_SITE_URL ?>js/lib/jquery.uniform.min.js"></script>
        <script src="<?php echo BACKEND_SITE_URL ?>js/main.js"></script>
        <script type="text/javascript">
<?php if (user()->hasFlash('success')) : ?>
                                            $.sticky("<?php echo h(user()->getFlash('success')) ?>", {autoclose: 10000, position: "bottom-right", type: "st-success"});
<?php endif; ?>
<?php if (user()->hasFlash('error')) : ?>
                                            $.sticky("<?php echo h(user()->getFlash('error')) ?>", {autoclose: 10000, position: "bottom-right", type: "st-error"});
<?php endif; ?>
<?php if (user()->hasFlash('info')) : ?>
                                            $.sticky("<?php echo h(user()->getFlash('info')) ?>", {autoclose: 10000, position: "bottom-right", type: "st-info"});
<?php endif; ?>
        </script>
    </body>
</html>